package com.feib.soeasy.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.feib.soeasy.job.service.ImportService;
import com.feib.soeasy.model.PayerTemp;
import com.feib.soeasy.model.Payment;
import com.feib.soeasy.model.UploadFile;
import com.feib.soeasy.pagination.PaginatedList;

/**
 * @title (#)PayerTempService.java<br>
 * @description <br>
 * @author Anson Tsai<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2011/2/12 create by Anson Tsai<br>
 */
@Transactional(readOnly = true)
public interface PayerTempService  {

    /**
     * 查詢未放行的繳款人資料
     * @param groupNo
     * @param payerNo
     * @return
     */
    public PayerTemp getPayerTempNoConfirm(String groupNo, String payerNo);
    
    /**
     * 
     * @param groupNo
     * @param payerNo
     * @param paginationConfig
     * @return
     */
    public PaginatedList<PayerTemp> getPayerTempNoConfirm(PaginatedList<PayerTemp> paginationConfig);
    
    /**
     * 
     * @param groupNo
     * @param payerNo
     * @return
     */
    public boolean getPayerTempIsExist(String groupNo, String payerNo);
    
    /**
     * 
     * @param payerTempPk
     * @return
     */
    public PayerTemp getPayerTempByPk(Long payerTempPk);

    /**
     * 儲存功能
     * 
     * @param m
     */
    @Transactional(readOnly = false)
    public PayerTemp save(PayerTemp p);

    /**
     * 刪除功能
     * 
     * @param m
     */
    @Transactional(readOnly = false)
    public void delete(PayerTemp p);

    /**
     * @param checkPayerTemp
     * @param payerStatus
     */
    @Transactional(readOnly = false)
    public void updatePayerStatus(List<PayerTemp> checkPayerTemp, String payerStatus);

    /**
     * @param checkUploadFile 
     * @param status
     */
    @Transactional(readOnly = false)
    public void updatePayerStatusByUploadFile( List<UploadFile> checkUploadFile, Integer status);

    /**
     * @param payerTemp
     * @param paginationConfig
     * @return
     */
    public PaginatedList<PayerTemp> queryByPayerTemp(PayerTemp payerTemp, PaginatedList<PayerTemp> paginationConfig);

    
    /**
     * 新增繳費人單到資料庫中
     * @param payerTemps
     */
    @Transactional(readOnly = false)
    public void addPayerTemp(List<PayerTemp> payerTemps);

 
    /**
     * 刪除已新增的繳費人
     * @param uploadFile
     */
    @Transactional(readOnly = false)
    public void deletePayerTempsByUploadFile(UploadFile uploadFile);
    

    /**
     * 原本以GROUPNO查詢 但是TABLE只剩GROUP Pk
     * @param Long groupPk
     * @param payerNo
     * @return
     */
    public boolean getPayerTempIsExistByGroupPk(Long groupPk, String payerNo);
    
    
    /**
     * 查詢未放行的繳款人資料
     * @param groupNo
     * @param payerNo
     * @return
     */
    public PayerTemp getPayerTempNoConfirmByGroupPk(Long groupPk, String payerNo);
    
    
    


}
